
import java.util.Scanner;

public class Test {
    private static int[] array;

    public static void main(String[] args) {
        Scanner scannner = new Scanner(System.in);
        int num = scannner.nextInt();
        array = new int[num];
        int i = 0;
        for (int j = 0; j < num; j++) {
            array[j] = scannner.nextInt();
        }
        randomSort();
        for (int j = 0; j < array.length; j++) {
            System.out.println(array[i]+" ");
        }
    }

    public static void randomSort() {
        sort( 0, array.length-1);
    }

    private static void sort(int l, int r) {
        if (l >= r) {
            return;
        }
        int random = array[l + (int) (Math.random() * (r - l + 1))];
        adjust(random,l,r);
        int left = first;
        int right = last;
        sort(l,left-1);
        sort(right+1,r);
    }
    public static int first,last;
    private static void adjust(int random, int l, int r) {
        first = l;
        last = r;
        int i = l;

        while (i<=r) {
            if(array[i]<random) {
                swap(i++,first++);
            }else if (array[i]==random) {
                i++;
            } else {
                swap(last--,i);
            }
        }

    }
    private static void swap(int a, int b) {
        int tmp = array[a];
        array[a] = array[b];
        array[b] = tmp;
    }

}
